<%@page import="cn.net.withub.common.utils.CommonUtils"%>
<%@page import="java.util.Iterator"%>
<%@page import="net.sf.json.JSONArray"%>
<%@page import="net.sf.json.JSONObject"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.Date"%>
<%@page import="java.util.List"%>
<%@page import="cn.net.withub.common.model.CourtInfo"%>
<%@page import="cn.net.withub.common.utils.SpringBeanHelper"%>
<%@page import="cn.net.withub.xfgl.xtgl.bo.XtglManager"%>
<%@page import="cn.net.withub.common.CommonProperties"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="cn.net.withub.xfgl.ssfw.bo.SsfwManager"%>
<%@ page import="cn.net.withub.common.Constant" %>
<% String path = request.getContextPath(); %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%
    String url = request.getParameter("url")==null?"":request.getParameter("url");
    String lc_id = request.getParameter("lcid")==null?"":request.getParameter("lcid");
    String toUrl = session.getAttribute("toUrl")==null?"":(String) session.getAttribute("toUrl");

    XtglManager xtglManager = (XtglManager)SpringBeanHelper.getBean(session.getServletContext(),"xtglManager");
    List list = xtglManager.getXtptResource("",session);
    Map resMap = xtglManager.getUserResMap((CourtInfo)session.getAttribute("courtInfo"));
    request.setAttribute("reslist",list);
    request.setAttribute("currentDate",new Date());
    //int screenWidth = ((int) java.awt.Toolkit.getDefaultToolkit().getScreenSize().width);
    //int screenHeight = ((int) java.awt.Toolkit.getDefaultToolkit().getScreenSize().height);
    Iterator<String> it = resMap.keySet().iterator();
    String resKey = ",";
    while(it.hasNext()){
        resKey+=it.next()+",";
    }
    List onlineUserList = (List)session.getServletContext().getAttribute("onlineUserList");
    CourtInfo courtInfo = (CourtInfo)request.getSession().getAttribute("courtInfo");

    boolean cfjbqx = false;//重访交办权限   有重访交办的才提醒问题交流数量
    if (courtInfo.getRolesIds() != null && (courtInfo.getRolesIds().contains("100885") || courtInfo.getRolesIds().contains("100964") || courtInfo.getRolesIds().contains("100965"))) {
        cfjbqx = true;
    }
    /** 登记室直接跳转登记页面判断 **/
    String djstz = "";
    int bjbz = 0;
    if(courtInfo!=null&&courtInfo.getDepartId().equals("817")){
        djstz = "1";
    }
    if(courtInfo!=null){
        bjbz = courtInfo.getBjbz();
    }

    SsfwManager ssfw = (SsfwManager)SpringBeanHelper.getBean(session.getServletContext(),"ssfwManager");

    List<Map<String,String>> tsList = ssfw.getTSXX(courtInfo);

    String tsxx = "";
    for(Map<String, String> map :tsList){
        String ywlx = map.get("ywlx");
        String count = map.get("count");
        String jjcq = map.get("jjcq");
        String cq = map.get("cq");
        if(tsxx.length()>0)tsxx += ";";
        tsxx += ywlx+","+count+","+jjcq+","+cq;
    }
    //System.out.println(tsList.size());
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>最高人民法院来访信息管理系统</title>
    <link rel="stylesheet" type="text/css" href="<%=path%>/common/css/n_admin.css"/>
    <link rel="stylesheet" type="text/css" href="<%=path%>/common/css/index.css"/>
    <!--[if lte IE 6]>
    <script src="<%=path%>/common/js/DD_belatedPNG_0.0.8a.js" type="text/javascript"></script>
    <script type="text/javascript">
    DD_belatedPNG.fix('div, ul, img, li, input , a, .xf_fromk');
    /* 将 .png_bg 改成你应用了透明PNG的CSS选择器*/
</script>
<![endif]-->
    <link rel="stylesheet" type="text/css" href="<%=path%>/common/jquery-easyui-1.3.2/themes/default/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="<%=path%>/common/jquery-easyui-1.3.2/themes/icon.css"/>
    <%--<link rel="stylesheet" type="text/css" href="<%=path%>/common/layui-v2.6.6/layui/css/layui.css">--%>
    <link rel="stylesheet" type="text/css" href="<%=path%>/common/font-awesome-4.7.0/css/font-awesome.min.css"/>
    <script type="text/javascript" src="<%=path%>/common/jquery-easyui-1.3.2/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="<%=path%>/common/jquery-easyui-1.3.2/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="<%=path%>/common/js/pubCommon.js"></script>
    <script type="text/javascript" src="<%=path%>/common/layui-v2.6.6/layui/layui.js"></script>
    <script type="text/javascript">
        var toURL = "<%=toUrl%>";

        //模拟点击
        var defaultPage = {
            topMenuId: '${param.topMenuId}',
            page: '${param.page}'
        };
        if (defaultPage.topMenuId) {
            setTimeout('defaultClick()',200);
        }
        function defaultClick () {
            $("#"+defaultPage.topMenuId).click();
            if (defaultPage.page) {
                setTimeout(function () {

                    $ (".xf_nr_left li a").each (function () {
                        var $this = $ (this);
                        var onclick = $this.attr ('onclick');
                        if (onclick.indexOf (defaultPage.page) > -1) {
                            $this.click();
                        }
                    });
                },200)
            }
        }


        var objSFZ = null;
        var RES_NO = '<%=resKey%>';
        var bjbz = "<%=bjbz%>";
        var tsxx = "<%=tsxx%>";
        if(tsxx.length>0){
            var tsxxs = tsxx.split(";");
            var tt = "";
            for(var i=0;i<tsxxs.length;i++){
                var tmp = tsxxs[0].split(",");
                if(tt.length>0)tt+="\n";
                if(tmp[0]==1 && tmp[1] >0 && (tmp[2]>0 || tmp[3]>0)){
                    tt += "  您有"+tmp[1]+"件网上（预约）立案申请待办理，其中";
                    if(tmp[2]>0){
                        tt += tmp[2]+"件即将超期";
                    }
                    if(tmp[3]>0){
                        if(tmp[2]>0){
                            tt += "，";
                        }
                        tt += tmp[3]+"件已经超期";
                    }

                    tt += "，请尽快办理。";
                }
            }
            if(tt != ""){
                //alert(tt);
                layer.open({
                    title: ['系统提示', 'text-align:left;'],
                    content: tt,
                    icon: 7,
                    resize: false
                });
            }
        }
        function setCwinHeight(frameID){
            try{
                var iframeid=document.getElementById(frameID);
                if (document.getElementById){
                    if (iframeid && !window.opera){
                        if (iframeid.contentdocument && iframeid.contentdocument.body.offsetHeight){
                            iframeid.height = iframeid.contentdocument.body.offsetHeight;
                        }else if(iframeid.Document && iframeid.Document.body.scrollHeight){
                            iframeid.height = iframeid.Document.body.scrollHeight;
                        }
                        if(iframeid.height<600){
                            iframeid.height = 600;
                        }
                    }
                }
                if($.browser.msie&&($.browser.version==6.0)&&!$.support.style){
                    var width =  window.screen.availWidth;
                    if(width>1024){
                        width=1024;
                    }else{
                        width=768;
                    }
                    //if($(window.frames["mainFrame"].document).find("body").length>0){
                    $(window.frames[frameID].document).find("body").css("width",width);
                    //}
                }else{
                    //$(window.frames["mainFrame"].document).find("body").css("width",window.screen.availWidth*0.9-190);
                }

                if($(window.frames[frameID].document).find("body").length>0){
                    var height = Number($(iframeid).contents().find("body").outerHeight(true));
                    if(height>=Number(iframeid.height)){
                        iframeid.height = height+10;
                    }else{
                        iframeid.height = Number(iframeid.height)+10;
                    }
                }
            }catch (e) {
                var src = iframeid.src;
                if(src && src.indexOf("redirectUrl.jsp") != -1){
                    iframeid.height = 1000;
                }else{
                    iframeid.height = 650;
                }
            }
            refreshLeftHeight(frameID);
        }

        function refreshLeftHeight(frameID){
            var iframeid=document.getElementById(frameID);
            //var kongbai_height = Number(iframeid.height)-$(".xf_menu_bg").height()+$(".xf_kongbai2").height()+40;
            //$(".xf_kongbai2").height(kongbai_height);
            //var kongbai_height = $("#xf_nr_div").height()-$(".xf_nr_left").height()+$(".xf_kongbai2").height();
            //$(".xf_kongbai2").height(kongbai_height);
            //$("#xf_nr_div").height(Number(iframeid.height)+$(".n_menu").height()+10);
            if((Number(iframeid.height)+$(".n_menu").height()+20)>($(".geren").height()+$("#divMenuInfo").height())){
                var kongbai_height = (Number(iframeid.height)+$(".n_menu").height()+10)-$(".nr_left_top").height()-$("#divMenuInfo").height();
                $(".xf_kongbai2").height(kongbai_height+10);
            }else{
                $(".xf_kongbai2").height(0);
                iframeid.height = $(".xf_nr_left").height()-$(".n_menu").height()-10;
            }
        }

        function getChildWindow(){
            return document.getElementById("mainFrame").contentWindow;
        }

        var docHeight = 0;
        $(function(){
            docHeight = $(document).height();
            //组装欢迎词
            var day = new Date('<s:date name="#request.currentDate" format="yyyy/MM/dd HH:mm:ss"/>');
            var hr = day.getHours();
            var mess="";
            if (( hr >= 0 ) && (hr <=4 ))
                mess+="深夜了，注意身体哦... ";
            if (( hr >= 4 ) && (hr < 7))
                mess+="清晨好! ";
            if (( hr >= 7 ) && (hr < 12))
                mess+="早上好！";
            if (( hr >= 12) && (hr < 13))
                mess+="午饭时间！";
            if (( hr >= 13) && (hr < 17))
                mess+="下午好!";
            if (( hr >= 17) && (hr < 18))
                mess+="傍晚好!";
            if ((hr >= 18) && (hr < 19))
                mess+="晚饭时间!";
            if ((hr >= 19) && (hr <= 23))
                mess+="到晚上,注意休息!";
            $(".ajiage").html("<s:property value="#session.courtInfo.userName"/>  "+mess);//今天是 <s:date name="#request.currentDate" format="yyyy-MM-dd"/>
            <%if(CommonUtils.isNotEmpty(url)&&CommonUtils.isNotEmpty(lc_id)){%>
            refreshFrameUrl('<%=url%>');
            if('<%=lc_id%>'.startWith("1")){
                clickBl();
            }else if ('<%=lc_id%>'.startWith("SJ")){
                clickSJBl();
            }else{
                clickSdyb();
            }
            <%}else{%>
            $(".n_top a:eq(0)").click();
            <%}%>

            if(<%=cfjbqx%>){
                getMessageCount();

                //8分钟刷新一次
                var reloadTime = 480000;
                //reloadTime = 10000;
                setInterval(function () {
                    getMessageCount ();
                }, reloadTime)
            }




        });

        function refreshFrameHeight(height){
            if(height&&Number(height)>0){
                document.getElementById("mainFrame").height=height;
                refreshLeftHeight("mainFrame");
            }else{
                setCwinHeight("mainFrame");
            }
        }

        function reloadFrame(url){
            $getObj("mainFrame").src=url;
        }

        function refreshFrameUrl(url){
            $getObj("mainFrame").src="";
            $getObj("mainFrame").src=url;
        }
        function gotoQtxt (ywid, open) {
            var url = "<%=path%>/lcglAction!sso.action";
            var datas = {
                ywid: ywid
            };
            $.post (url, datas, function (data) {
                if (data != "") {
                    if (open) {
                        window.open (data);
                    }else {
                        window.location.href = data;
                    }
                }
            });
        }
        function getResourceTree(no,name,obj,imgSrc,defUrl,resNo){
            //返回
            if (name.indexOf ("返回") > -1) {
                gotoQtxt ("XFZHCX");
                return false;
            }
            //跳转数据中心处理
            if(defUrl.indexOf("toXfdc")>-1){
                window.open("<%=path%>/"+defUrl);
                return false;
            }
            //跳转报表分析
            if(defUrl.indexOf("bbfx")>-1){
                var userid = "<%=courtInfo.getUserId()%>";
                var fydm = "<%=courtInfo.getFyDm()%>";

                $("#bbfxForm>input[name='userid']").val(userid);
                $("#bbfxForm>input[name='fydm']").val(fydm);
                var url = "<%=CommonProperties.bbApp%>";
                $("#bbfxForm").attr("action",url);
                bbfxForm.submit();

                return false;
            }
            if(obj==null){
                obj=document.getElementById("a_1013466");
            }
            currentImgUrl = imgSrc;
            $("#mbbtitle").html(name);
            var url = "<%=path%>/common/include/menu.jsp?no="+no+"&name="+encodeURI(name)+"&rand="+Math.random();
            $('.xf_menu_bg').html('');
            $.get(url,function(data){
                if(data!=null){
                    alert(55);
                    $('.xf_menu_bg').html(data.trim());
                    refreshLeftHeight("mainFrame");
                    //refreshFrameHeight(docHeight-210);
                    //$('.xf_menu_bg').height(docHeight-210);
                    Bl_TARGET_URL = Bl_TARGET_URL=="1"?"false":"true";
                    var syurl = "<%=path%>/xfgl/xfdb/xfdb.jsp";
                    if(toURL!="" && toURL!=null){//判断是否是跳转过来的
                        $getObj("mainFrame").src="<%=path%>"+toURL;
                        $getObj ("mainFrame").height = 1000;
                        toURL = "";
                    }else{
                        if("1" == bjbz){
                            $getObj("mainFrame").src=syurl;
                        }else{
                            if(no==''){
                                if($.browser.msie&&($.browser.version<=6.0)&&!$.support.style){
                                    //$getObj("mainFrame").src='<%=path%>/ieUpload.jsp';
                                    //登记室跳转
                                    if("<%=djstz%>"=="1"){
                                        $getObj("mainFrame").src='<%=path%>/xfgl/xfdj/lfdj.jsp';
                                    }else{
                                        $getObj("mainFrame").src=syurl;
                                    }
                                }else{
                                    //登记室跳转
                                    if("<%=djstz%>"=="1"){
                                        $getObj("mainFrame").src='<%=path%>/xfgl/xfdj/lfdj.jsp';
                                    }else{
                                        $getObj("mainFrame").src=syurl;
                                    }
                                }
                                showOrHideLeft($getObj("showLeftTag"),true,false);
                            }else{
                                if(Bl_TARGET_URL=="true"){
                                    if (defUrl && defUrl != '' && defUrl != '#' && defUrl != '#' && RES_NO.indexOf ("," + resNo + ",") > -1) {
                                        $getObj ("mainFrame").src = "";
                                        $getObj ("mainFrame").height = 0;
                                        $getObj ("mainFrame").src = '<%=path%>' + defUrl;
                                    }else {//默认点击第一个
                                        $ ("#divMenuInfo li a").eq (0).click ();
                                    }
                                }
                                showOrHideLeft($getObj("showLeftTag"),true,false);
                                Bl_TARGET_URL = "false";
                            }
                        }
                    }

                }
            });
        }

        function loginOut(){
            top.location.href='<%=path%>/loginAction!loginOut.action';
            if(<%= !"000".equals(courtInfo.getFyDm()) %>){
                window.open ('about:blank', '_top').close();
                //window.top.close();
            }
        }

        function showOrHideLeft(obj,flag,menuFlag){
            flag = typeof(flag)=="undefined"?$(obj).parent().attr("class")=="xf_zhedie2":flag;
            if(flag){
                $("#xf_nr_div").attr("class","xf_nr_right");
                $(obj).parent().attr("class","xf_zhedie");
                $(obj).find("img").attr("src","<%=path%>/common/images/xf_zedie.png");
                $(".xf_nr_left").show();
                $(obj).find("img").show();
            }else{
                $("#xf_nr_div").attr("class","xf_nr_right2");
                $(obj).parent().attr("class","xf_zhedie2");
                $(obj).find("img").attr("src","<%=path%>/common/images/xf_zedie2.png");
                $(".xf_nr_left").hide();
                $(obj).find("img").show();
            }
            if(menuFlag&&menuFlag==true){
                $(".xf_nr_left").hide();
                $(obj).find("img").hide();
            }
            try{
                if(Bl_TARGET_URL=="false"){
                    if(typeof $getObj("mainFrame").contentWindow.initEaysuiTabsInfo == "function"){
                        $getObj("mainFrame").contentWindow.initEaysuiTabsInfo();
                    }
                }
            }catch(e){
                // alert(e);
                layer.open({
                    title: ['系统提示', 'text-align:left;'],
                    content: e,
                    icon: 7,
                    resize: false
                });
            }
            try{
                $getObj("mainFrame").contentWindow.refreshGridWidth();
            }catch (e) {
            }
            refreshFrameHeight();
        }

        function menuClick(targetUrl,targetBlank){
            //滚动条返回顶部
            window.scrollTo(0,0);
            if(targetUrl&&targetUrl!='#'){
                if(targetBlank&&(targetBlank=='_blank'||targetBlank=='open')){
                    window.open('<%=path%>'+targetUrl);
                }else if(targetUrl.indexOf('http://')==0){
                    $getObj("mainFrame").src="";
                    $getObj("mainFrame").height=docHeight-200;
                    //$getObj("mainFrame").src=targetUrl;
                    document.getElementById("mainFrame").src = targetUrl;
                }else{
                    $getObj("mainFrame").src="";
                    $getObj("mainFrame").height=0;
                    $getObj("mainFrame").src='<%=path%>'+targetUrl;
                }
            }
        }

        function menuClick(targetUrl,targetBlank,bt,bt1,bt2){
            //滚动条返回顶部
            window.scrollTo(0,0);
            if(targetUrl&&targetUrl!='#'){
                if(targetBlank&&(targetBlank=='_blank'||targetBlank=='open')){
                    window.open('<%=path%>'+targetUrl);
                }else if(targetUrl.indexOf('http://')==0){
                    $getObj("mainFrame").src="";
                    $getObj("mainFrame").height=docHeight-200;
                    //$getObj("mainFrame").src=targetUrl;
                    document.getElementById("mainFrame").src = targetUrl;
                    $("#navigationBar").html(bt+" >> "+bt1+" >> "+bt2);
                }else{
                    $getObj("mainFrame").src="";
                    $getObj("mainFrame").height=0;
                    $getObj("mainFrame").src='<%=path%>'+targetUrl;
                    $("#navigationBar").html(bt+" >> "+bt1+" >> "+bt2);
                }
            }
        }
        function menuShowOrHide(obj){
            var ulObj = $(obj).parent().next("div");
            if(ulObj.css("display")=="none"){
                //$(obj).find("img").attr("src","<%=path%>/common/images/n_dot_01.png");
            }else{
                //$(obj).find("img").attr("src","<%=path%>/common/images/n_dot_01.png");
            }
            ulObj.toggle(100);
            setTimeout(refreshFrameHeight,100);
        }

        function toIndex(obj){
            getResourceTree('','首页',obj,'n_menu01_b.png','map.jsp');
            // $("#navigationBar").html("首&nbsp;页");
            $("#navigationBar").html("");
        }
        function hideNav () {
            $("#navigationBar").hide();
        }
        var Bl_TARGET_URL = "false";
        function clickBl(){
            Bl_TARGET_URL = "1";
            //$(".n_menu a:eq(1)").click();
            $("#a_1013466").click();

            //alert($(".n_menu a:eq(1)").attr("onclick"));
        }

        function clickSJBl(){
            Bl_TARGET_URL = "1";
            //$(".n_menu a:eq(2)").click();
            $("#a_1013519").click();
            //alert($(".n_menu a:eq(1)").attr("onclick"));
        }

        function clickSdyb(){
            Bl_TARGET_URL = "1";
            $("#a_1013561").click();
            //$(".n_menu a:eq(8)").click();
            //alert($(".n_menu a:eq(1)").attr("onclick"));
        }

        function resetIFrameZero(){
            $getObj("mainFrame").height=0;
        }

        function changeTopDis(type,obj){
            if(type==1){
                $("#topDiv").removeClass("xf_banner");
                $("#topDiv").addClass("xf_banner2");
                $(obj).hide();
                $("#zhedie_01").hide();
                $("#zhedie_02").show();
                $("#zhedie_02_a").show();
            }else{
                $("#topDiv").removeClass("xf_banner2");
                $("#topDiv").addClass("xf_banner");
                $(obj).hide();
                $("#zhedie_02").hide();
                $("#zhedie_01").show();
                $("#zhedie_01_a").show();
            }
        }

        var currentImgUrl = "";
        function changeImg(obj,src,type){
            if(type==1){
                if($(obj).attr("src").replace("_a.","_b.").indexOf(currentImgUrl)>0){
                    $(obj).attr("src",src.replace("_a.","_b."));
                }else{
                    $(obj).attr("src",src.replace("_b.","_a."));
                }

            }else{
                $(obj).attr("src",src);
            }
        }

        function getObjSrc(obj){
            return obj.innerHTML;
        }

        function toXfdbLst(){
            var url = "<%=path%>/xfgl/xfindex/db_list.jsp";
            refreshFrameUrl(url);
            clickBl();
        }

        function toUpdatePWD(){
            var url = "<%=path%>/xfgl/updatePwd.jsp";
            refreshFrameUrl(url);
        }
        //浏览器的关闭事件
        window.onbeforeunload = function() {
            var n = window.event.screenX - window.screenLeft;
            var b = n > document.documentElement.scrollWidth-20;
            if(b && window.event.clientY < 0 || window.event.altKey) {
                //alert("是关闭而非刷新");
                //window.open(this.location);
                top.location.href='<%=path%>/loginAction!loginOut.action';
                //return false;
                //window.event.returnValue = "";

            } else{
                //alert("是刷新而非关闭");
            }
        }
        function znkfShow(type){
            if(type=="show"){
                $("#seldiv").hide();
                $("#seldiv1").show();
            }else{
                $("#seldiv").show();
                $("#seldiv1").hide();
            }
        }

        function znkfShow1(type){
            if(type=="show"){
                $("#seldiv1").show();
                $("#seldiv").hide();
            }else{
                $("#seldiv1").hide();
                $("#seldiv").show();
            }
        }

        var dyCount = 0;//调用获取提醒总数的方法次数
        var dsqId;
        var messageObj = {};

        /**
         * 获取消息数量(主题问题)
         */
        function getMessageCount () {
            stopShansuo ();
            var url = '<%=path%>/wtjlAction!getDhfCount.action';
            $.post (url, function (data) {
                if (data) {
                    //messageObj[dyCount] = data['messageTotal'];
                    $ ("#messageCount").html (data['messageTotal']);
                    //$ ("#mymessage").show ();
                    //第二次大于第一次时才闪烁  点击后取消闪烁
                    /*if (dyCount > 0 && messageObj[dyCount] > messageObj[dyCount - 1]) {
                        shansuo();
                    }
                    dyCount++;*/
                    //修改成大于0就闪烁
                    if (data['messageTotal'] > 0) {
                        shansuo();
                    }
                }
                //shansuo();
            }, 'json');
        }

        //消息闪烁提醒
        function shansuo () {
            dsqId = setInterval (function () {
                $ ("#mymessageImg").toggleClass ('show hide');
            }, 500);
        }

        function stopShansuo () {
            if (dsqId) {
                clearInterval (dsqId);
                $ ("#mymessageImg").removeClass ('hide').addClass ('show');
            }
        }

        //跳转问题解答
        function toWtDjd () {
            //stopShansuo();
            <%--window.location.href = '<%=path%>/xfgl/wtjl/answer.jsp';--%>
            var url = '';
            /*if (<%=courtInfo.getRolesIds () != null && courtInfo.getRolesIds ().contains ("100966")%>) {
            url = '/xfgl/wtjl/answer.jsp';
        }else if (<%=courtInfo.getRolesIds () != null && courtInfo.getRolesIds ().contains ("100967")%>) {
            url = '/xfgl/wtjl/answer.jsp';
        }else {
            url = '/xfgl/wtjl/myQuestion.jsp?tabType=2';
        }*/
            //整合修改成一个页面 20201027
            if (<%=courtInfo.getRolesIds () != null && (courtInfo.getRolesIds ().contains ("100966") || courtInfo.getRolesIds ().contains ("100967"))%>) {
                url = '/xfgl/wtjl/wdjl.jsp?tabType=2';
            }else {
                url = '/xfgl/wtjl/wdjl.jsp?tabType=3';//少3个tab
            }
            $("#navigationBar").html("我的消息 >> 消息列表");
            refreshFrameUrl ('<%=path%>' + url);

        }

    </script>
    <style>
        .show {
            display: inline-block;
        }
        .hide {
            display: none;
        }
    </style>
</head>

<body style="background: #e0ecff;">
<div class="n_top">
    <img src="<%=path%>/common/images/logo.png" /><h1>最高人民法院来访信访管理系统</h1>
    <%--<div class="grxx" style=""><span><img src="<%=path%>/common/images/01.png" /></span>admin |<a>退出</a></div>--%>
    <ul>
        <s:iterator value="#request.reslist" status="bean" id="obj">
            <li class="n_wx">
                <a href="###" id="a_<s:property value="nodeID"/>" class="xf_main_menu_a" onclick="getResourceTree('<s:property value="nodeID"/>','<s:property value="nodeName"/>',this,'<s:property value="properties.icon_name"/>','<s:property value="linkUrl"/>','<s:property value="resource_link"/>')">
                    <i class="<s:property value="properties.icon_name"/>"></i><br /><s:property value="nodeName"/>
                </a>
            </li>
        </s:iterator>
        <li class="n_wx">
            <a href="###" onclick="loginOut();"><i class="fa fa-sign-out"></i><br />退 出</a>
        </li>
    </ul>
</div>
<div class="xf_top">
    <div class="top_tm"></div>
</div>

<div class="xf_nr" style="background: #e0ecff;">
    <!--折叠样式展开-->
    <div class="xf_zhedie"><a href="javascript:void(0);" id="showLeftTag" onclick="javascript:showOrHideLeft(this);return false;"><img src="<%=path%>/common/images/xf_zedie.png" /><!--点击--></a></div>
    <!--折叠样式收拢-->
    <!--左边树形菜单开始-->
    <div class="xf_nr_left">
        <div class="nr_left_top"><span class="ajiage"></span><br />
            <span class="ahuang acu">今天是：<s:date name="#request.currentDate" format="yyyy年MM月dd日"/>
            </span>
            <br />
            <div style=" text-align:center; padding:4px; border-top:1px solid #FFf; font-size:24px; font-family:'微软雅黑'; color:#FFf;" id="mbbtitle">信访管理</div>
        </div>
        <%--<div class="n_left">
            <div class="geren">
                <img src="<%=path%>/common/images/01.png">
                <span>
                    <b>&lt;%&ndash;<s:property value="#session.courtInfo.userName"/>&nbsp;&ndash;%&gt;您好，欢迎登录!</b><br>今天是<s:date name="#request.currentDate" format="yyyy年MM月dd日"/>
                </span>
                <div class="clear"></div>
            </div>
            <p id="mbbtitle" style="display:none;">来访</p>
        </div>--%>
        <div class="xf_menu_bg" style="overflow-y:auto;overflow-x:hidden">

        </div>
    </div>
    <!--左边树形菜单结束-->

    <!--右边显示区开始-->
    <div class="xf_nr_right" id="xf_nr_div" style="padding-left: 1px;background: #e0ecff;">
        <div class="n_menu">
        </div>
        <div>
            <div id="navigationBar"  style="font-weight: bold;color:#078BB7">

            </div>
            <iframe  onload="Javascript:setCwinHeight('mainFrame')" onreadystatechange=""  width="99.9%" height="0" id="mainFrame" name="mainFrame" src="" frameborder="0"  border="false"  scrolling="auto"></iframe>
        </div>
    </div>
    <!--右边显示区结束-->
    <div class="clear"></div>
</div>
<!--中间部分结束-->
<div class="xf_bottom">技术支持：&nbsp;&nbsp;最高人民法院立案一庭、最高人民法院信息中心、上海交大慧谷通用技术有限公司</div>
<jsp:include page="common/include/loading.jsp"/>
<jsp:include page="common/include/openDialog.jsp"/>
<%@include file="/common/include/bbfxForm.jsp"%>
</body>
<script type="text/javascript">
    $().ready (function () {
        getUnreadMessageCount();//未读消息
    });
    //未读消息
    function getUnreadMessageCount(){
        var where = "and C_JSRFYBM = '<%=courtInfo.getFyDm() %>' and C_JSRBMBM = '<%=courtInfo.getDepartId() %>' and C_JSRBM = '<%=courtInfo.getUserId() %>' AND C_XTLX='lfdb' ";
        url = "<%=path%>/messageAction!getUnreadMessageCount.action";
        var params = {
            where:where
        };
        $.post(url,params,function(data){
            if(data == null || data == ""){
                data = "0";
            }
            $("#message").text(data);
        });
    }
    //跳转消息列表
    function message(){
        getUnreadMessageCount();
        var url = "<%=path%>/xfgl/message/unread_list.jsp";
        $("#navigationBar").html("未读信息 >> 消息列表");
        $("#mainFrame").attr("src",url);
    }


    /**
     * layer组件
     * @param type
     * @param title
     * @param content
     * @param icon   图标
     * @param skin   内置样式
     * @param resize 是否允许调整大小
     * @param move  是否允许拖动
     * @param area  高宽
     * @param time  自动定时关闭
     * @param endFun 关闭后的操作
     */
    function openMyLayer(type,title,content,icon,skin,resize,move,area,time,endFun){
        layer.open({
            type:type,
            title: title,//'title'或者['系统提示', 'text-align:left;']或者false
            content: content,//文本或者dom
            icon: icon,//图标
            skin:skin,
            resize:resize,
            move:move,
            area:area,
            time:time,
            end:endFun
        });
    }

    //知识图谱-测试
    function goZstp(){
        //目前改为不用登录
        var url = '<%=CommonProperties.ZSTP_URL%>';
        window.open(url);

        //以下是要登录代码
       /* var url = "<%=path%>/loginAction!gotoQtxt.action";
        var tourl = '<%=CommonProperties.ZSTP_URL%>';
        if(tourl){
            var datas = {
                type:'custom',
                toUrl:tourl,
                open:true
            };
            $.post(url, datas, function (data) {
                if(null != data && '' != data){
                    window.open(data);
                }
            });
        }*/
    }
</script>
</html>
